home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 9 / cdrt09.iso / mac / wrath demo / Wrath 50 / Shared.Dir / 01385_Script_1385 next >
Text File  |  1995-01-13  |  32KB  |  1,052 lines

  1. -- global scripts for Wrath of the Gods 40 MB demo
  2. on setGlobalStart
  3.     set the centerStage to TRUE
  4.     set the fixStageSize to TRUE
  5.     set the exitLock to TRUE
  6.     global list23c, tune33a, blox43a
  7.     global SaveMovie, SavePath
  8.     global invList, inv1, inv2, inv3, inv4, invCurrent, jumpFrame
  9.     global SaveFrame, mode, hScore, currentGems, currentScore
  10.     global invWind, invBank, invBanksAll
  11.     global altGlobal, playFrom, atOr, onOr, hintCount, invOff, Bri
  12.     global cont, saveGlobal
  13.  
  14.     set mode = 5
  15.     set hScore = 0
  16.     set currentGems = 2
  17.     set currentScore = 100
  18.     set altGlobal = 0
  19.     set playFrom = 0
  20.     set atOr = 0
  21.     set onOr = 1
  22.     set hintCount = 0
  23.     set invOff = 0
  24.     set Bri = 0
  25.     set the text of cast "scoreRap" to string(currentScore)
  26.     set invList = "s5a,w26a,l48a"
  27.     set invWind = 0
  28.     set invBank = 1
  29.     set invBanksAll = 1
  30.     set inv1 = "s5a"
  31.     set inv2 = "w26a"
  32.     set inv3 = "l48a"
  33.     set inv4 = "iBlank"
  34.     set invCurrent = EMPTY
  35.     set jumpFrame = EMPTY 
  36.     set cont = 0
  37.  
  38.     global firstOr, orCount
  39.     global o1a
  40.     global o3a    
  41.     global branch5a, lever5a, fulcrum5a, o5a
  42.     global fulcrum11c5a, fulcrum61a5a, gotSword5a
  43.     global pray6a, snake6a, Peddler6a, o6a
  44.     global youngWom7a, oldWom7a, firstTalk7a,¼
  45.         firstOldWom7a, necklace7a, o7a, o7a2 
  46.     global guys9a, branch9a, o9a
  47.     global hit10a, o10a
  48.     global pond11a, o11a
  49.     global avalanche11c, gem11c, rock11c, o11c
  50.     global torchGuy12a, dark12a, o12a
  51.     global torchGuy14a, hit14a, heads14a, tHeads14a, o14a, o14a2
  52.     global o14b
  53.     global Hera14c, o14c
  54.     global Peddler15a, rap15a, pedPay15a, o15a
  55.     global seedbag16a, seedmen16a, bagSee16a, fight16a, o16a, o16a2
  56.     global o16b
  57.     global o16c, o16c2, o16c3
  58.     global o17a
  59.     global hit18b, door18b, o18b
  60.     global vat18c, oars18c, gem18c, o18c
  61.     global upTree19b, downTree19b, o19b
  62.     global Sciron20a, o20a
  63.     global across20b, o20b
  64.     global o20c
  65.     global Shade20g, coin20g
  66.     global o20i
  67.     global first20j, sledge20j, o20j
  68.     global o21a
  69.     global firstTalk23a, King23a, Queen23a, kingWait23a, o23a, o23a2
  70.     global first23b, hit23b, gotSword23b
  71.     global oneRock23b, twoRock23b, threeRock23b, fourRock23b, fiveRock23b
  72.     global firstBreak23b, secondBreak23b, thirdBreak23b, o23b
  73.     global o23c
  74.     global lastQt23b
  75.     global first24a, o24a
  76.     global bees26a, o26a
  77.     global offer27a, o27a, o27a2
  78.     global o27c
  79.     global at28a, gem28a, dest28a, play28a, pilot28a, o28a, o28a2, o28a4
  80.     global o29a, fly29a
  81.     global tack30a, crash30a, Prow30a, o30a
  82.     global useWax31a, o31a
  83.     global wine32a, o32a
  84.     global die33a, do33a, o33a, o33a2
  85.     global o33b
  86.     global o34a
  87.     global gem35a, firstTalk35a, talk35a, o35a
  88.     global break35b, o35b, cave35b
  89.     global drunk38a, o38a
  90.     global Peddler38c, rap38c, gem38c, o38c
  91.     global o39a, in39a
  92.     global o42a
  93.     global got43a, o43a
  94.     global man44a, skip44a, o44a
  95.     global Sis45a
  96.     global rock45a, o45a
  97.     global slab45b, o45b
  98.     global Herc46a, o46a
  99.     global Pers46b, o46b
  100.     global talk46c, staff46c, o46c
  101.     global light47a, o47a
  102.     global Orpheus48a, o48a
  103.     global Theseus49a, o49a
  104.     global Cerb50a, o50a
  105.     global atm50b, o50b
  106.     global slab50c, o50c
  107.     global o52a
  108.     global first53a, hisClub53a, done53a, o53a
  109.     global first56a, at56a, o56a
  110.     global first57a, o57a
  111.     global o59a
  112.     global helmet60a, die60a, eye60a, o60a
  113.     global gem60b, o60b
  114.     global bridle60e, o60e
  115.     global rock61a, wine61a, ointment61a, chart61a
  116.     global gem61a, o61a, o61a2
  117.     global swim65a, o65a
  118.     global talk66a, o66a
  119.     global stix66b, o66b
  120.     global bird66d, vase66d, o66d
  121.     global o66e
  122.     global candle67a, o67a
  123.     global door68a, o68a
  124.     global leap68b, skip68b, o68b
  125.     global vases68c, o68c
  126.     global Ariadne69a, talk69a, rude69a, o69a
  127.     global vases70a, o70a
  128.     global o70b
  129.     global Dione70d, o70d
  130.     global o71a
  131.     global at74a, door74a, o74a
  132.     global o74b
  133.     global Atlas76a, o76a
  134.     global Peg78a, o78a
  135.     global o78b
  136.     global sandals78d, o78d
  137.     global blast81a, o81a
  138.     global Pan83a, o83a
  139.     global o83b
  140.     global Ped84a, o84a
  141.     global o85a
  142.     global reeds85c, string85c, o85c
  143.     global Argus86a, o86a
  144.     global Caeneus87a, o87a
  145.     global Hera87b, o87b
  146.     global o87c
  147.     global o88a
  148.     global o89a
  149.     global hit90a, lab90a, gotTack30a, o90a, doom30a, o68a2, add28a, razz76a, noGem32a
  150.     global eat89a
  151.  
  152. Put "list23c,tune33a,blox43a,SaveMovie,SavePath,invList,inv1,inv2,inv3,inv4,invCurrent,jumpFrame," into saveGlobal
  153. Put "SaveFrame,mode,hScore,currentGems,currentScore,invWind,invBank,invBanksAll,cont,firstOr,orCount,o1a,o3a,branch5a,lever5a," after saveGlobal
  154. Put "fulcrum5a,o5a,fulcrum11c5a,fulcrum61a5a,gotSword5a,pray6a,snake6a,Peddler6a,o6a,youngWom7a,oldWom7a,firstTalk7a,firstOldWom7a,necklace7a,o7a,o7a2,guys9a,branch9a,o9a,hit10a,o10a,pond11a,o11a,avalanche11c,gem11c,rock11c,o11c," after saveGlobal
  155. Put "torchGuy12a,dark12a,o12a,torchGuy14a,hit14a,heads14a,tHeads14a,o14a,o14a2,o14b,Hera14c,o14c,Peddler15a,rap15a,pedPay15a,o15a,seedbag16a,seedmen16a,bagSee16a,fight16a,o16a,o16a2,o16b,o16c,o16c2,o16c3,o17a,hit18b,door18b,o18b,vat18c," after saveGlobal
  156. Put "oars18c,gem18c,o18c,upTree19b,downTree19b,o19b,Sciron20a,o20a,across20b,o20b,o20c,Shade20g,coin20g,o20i,first20j,sledge20j,o20j,o21a,firstTalk23a,King23a,Queen23a,kingWait23a,o23a,o23a2,first23b,hit23b,gotSword23b,oneRock23b," after saveGlobal
  157. Put "twoRock23b,threeRock23b,fourRock23b,fiveRock23b,firstBreak23b,secondBreak23b,thirdBreak23b,o23b,o23c,lastQt23b,first24a,o24a,bees26a,o26a,offer27a,o27a,o27a2,o27c,at28a,gem28a,dest28a,play28a,pilot28a,o28a,o28a2,o28a4,o29a," after saveGlobal
  158. Put "fly29a,tack30a,crash30a,Prow30a,o30a,useWax31a,o31a,wine32a,o32a,die33a,do33a,o33a,o33a2,o33b,o34a,gem35a,firstTalk35a,talk35a,o35a,break35b,o35b,cave35b,drunk38a,o38a,Peddler38c,rap38c,gem38c,o38c,o39a,in39a,o42a," after saveGlobal
  159. Put "got43a,o43a,man44a,skip44a,o44a,Sis45a,rock45a,o45a,slab45b,o45b,Herc46a,o46a,Pers46b,o46b,talk46c,staff46c,o46c,light47a,o47a,Orpheus48a,o48a,Theseus49a,o49a,Cerb50a,o50a,atm50b,o50b,slab50c,o50c,o52a,first53a,hisClub53a,done53a," after saveGlobal
  160. Put "o53a,first56a,at56a,o56a,first57a,o57a,o59a,helmet60a,die60a,eye60a,o60a,gem60b,o60b,bridle60e,o60e,rock61a,wine61a,ointment61a,chart61a,gem61a,o61a,o61a2,swim65a,o65a,talk66a,o66a,stix66b,o66b,bird66d,vase66d,o66d,o66e,candle67a," after saveGlobal
  161. Put "o67a,door68a,o68a,leap68b,skip68b,o68b,vases68c,o68c,Ariadne69a,talk69a,rude69a,o69a,vases70a,o70a,o70b,Dione70d,o70d,o71a,at74a,door74a,o74a,o74b,Atlas76a,o76a,Peg78a,o78a,o78b,sandals78d,o78d,blast81a,o81a,Pan83a,o83a,o83b," after saveGlobal
  162. Put "Ped84a,o84a,o85a,reeds85c,string85c,o85c,Argus86a,o86a,Caeneus87a,o87a,Hera87b,o87b,o87c,o88a,o89a,hit90a,lab90a,gotTack30a,o90a,doom30a,o68a2,add28a,razz76a,noGem32a,eat89a,altGlobal,playFrom,atOr,onOr,hintCount,invOff,Bri,end0" after saveGlobal  -- òòòòòò replaced Herm90a with gotTack30a, o90a2 with doom30a
  163.     set list23c = "0,0,0"
  164.     set tune33a = "0,0,0"
  165.     set blox43a = "0,0,0,0,0"
  166.     set Peddler6a = 0
  167.     set youngWom7a = 0
  168.     set oldWom7a = 0
  169.     set guys9a = 0
  170.     set torchGuy12a = 0
  171.     set torchGuy14a = 0
  172.     set Hera14c = 0
  173.     set Peddler15a = 0
  174.     set seedmen16a = 0
  175.     set Sciron20a = 0
  176.     set Shade20g = 0
  177.     set King23a = 0
  178.     set Queen23a = 0
  179.     set Prow30a = 0
  180.     set Peddler38c = 0
  181.     set man44a = 0
  182.     set Sis45a = 0  
  183.     set Herc46a = 0 
  184.     set Pers46b = 0
  185.     set Orpheus48a = 0
  186.     set Theseus49a = 0
  187.     set bird66d = 0
  188.     set Ariadne69a = 0
  189.     set Dione70d = 0
  190.     set Atlas76a = 0
  191.     set Peg78a = 0
  192.     set Pan83a = 0
  193.     set Ped84a = 0
  194.     set Argus86a = 0 
  195.     set Caeneus87a = 0
  196.     set Hera87b = 0  
  197.     set gotTack30a = 0 
  198.     set branch5a = 0
  199.     set necklace7a = 0
  200.     set branch9a = 0
  201.     set gem11c = 0
  202.     set rock11c = 0 
  203.     set vat18c = 0
  204.     set oars18c = 0
  205.     set gem18c = 0
  206.     set tack30a = 0
  207.     set gem60b = 0
  208.     set bridle60e = 0
  209.     set rock61a = 0
  210.     set wine61a = 0
  211.     set ointment61a = 0
  212.     set chart61a = 0
  213.     set candle67a = 0
  214.     set vases68c = 0
  215.     set vases70a = 0
  216.     set sandals78d = 0
  217.     set fulcrum5a = 0
  218.     set lever5a = 0
  219.     set pray6a = 0  
  220.     set snake6a = 0
  221.     set fulcrum11c5a = 0
  222.     set fulcrum61a5a = 0
  223.     set gotSword5a = 0
  224.     set firstTalk7a = 0
  225.     set firstOldWom7a = 0
  226.     set hit10a = 0
  227.     set pond11a = 0
  228.     set avalanche11c = 0
  229.     set dark12a = 0
  230.     set hit14a = 0
  231.     set heads14a = 0
  232.     set tHeads14a = 0
  233.     set rap15a = 0
  234.     set pedPay15a = 0
  235.     set seedbag16a = 0
  236.     set bagSee16a = 0
  237.     set fight16a = 0
  238.     set hit18b = 0
  239.     set door18b = 0
  240.     set upTree19b = 0
  241.     set downTree19b = 0
  242.     set across20b = 0
  243.     set coin20g = 0
  244.     set first20j = 0
  245.     set sledge20j = 0
  246.     set firstTalk23a = 0
  247.     set kingWait23a = 0
  248.     set first23b = 0
  249.     set hit23b = 0
  250.     set gotSword23b = 0
  251.     set oneRock23b = 0
  252.     set twoRock23b = 0
  253.     set threeRock23b = 0
  254.     set fourRock23b = 0
  255.     set fiveRock23b = 0
  256.     set firstBreak23b = 0
  257.     set secondBreak23b = 0
  258.     set thirdBreak23b = 0
  259.     set lastQt23b = 0
  260.     set first24a = 0
  261.     set bees26a = 0
  262.     set offer27a = 0
  263.     set at28a = 0
  264.     set dest28a = 0
  265.     set gem28a = 0
  266.     set add28a = 0
  267.     set play28a = 0
  268.     set pilot28a = 0
  269.     set fly29a = 0
  270.     set crash30a = 0
  271.     set useWax31a = 0
  272.     set wine32a = 0
  273.     set noGem32a = 0
  274.     set die33a = 0
  275.     set do33a = 0
  276.     set gem35a = 0
  277.     set firstTalk35a = 0
  278.     set talk35a = 0
  279.     set break35b = 0
  280.     set cave35b = 0
  281.     set drunk38a = 0
  282.     set rap38c = 0
  283.     set gem38c = 0
  284.     set in39a = 0
  285.     set got43a = 0
  286.     set skip44a = 0
  287.     set rock45a = 0
  288.     set slab45b = 0
  289.     set talk46c = 0
  290.     set staff46c = 0
  291.     set light47a = 0
  292.     set Cerb50a = 0
  293.     set atm50b = 0
  294.     set slab50c = 0
  295.     set first53a = 0
  296.     set hisClub53a = 0
  297.     set done53a = 0
  298.     set first56a = 0
  299.     set at56a = 0
  300.     set first57a = 0
  301.     set helmet60a = 0
  302.     set die60a = 0
  303.     set eye60a = 0
  304.     set gem61a = 0
  305.     set swim65a = 0
  306.     set talk66a = 0
  307.     set stix66b = 0
  308.     set vase66d = 0
  309.     set door68a = 0
  310.     set leap68b = 0
  311.     set skip68b = 0
  312.     set talk69a = 0
  313.     set rude69a = 0
  314.     set at74a = 0
  315.     set door74a = 0
  316.     set razz76a = 0
  317.     set blast81a = 0
  318.     set reeds85c = 0
  319.     set string85c = 0
  320.     set eat89a = 0
  321.     set lab90a = 0
  322.     set hit90a = 0
  323.     set firstOr = 0
  324.     set orCount = 0
  325.     set o1a = 0
  326.     set o3a = 0
  327.     set o5a = 0
  328.     set o6a = 0
  329.     set o7a = 0
  330.     set o7a2 = 0
  331.     set o9a = 0
  332.     set o10a = 0
  333.     set o11a = 0
  334.     set o11c = 0
  335.     set o12a = 0
  336.     set o14a = 0
  337.     set o14a2 = 0
  338.     set o14b = 0
  339.     set o14c = 0
  340.     set o15a = 0
  341.     set o16a = 0
  342.     set o16a2 = 0
  343.     set o16b = 0
  344.     set o16c = 0
  345.     set o16c2 = 0
  346.     set o16c3 = 0
  347.     set o17a = 0
  348.     set o18b = 0
  349.     set o18c = 0
  350.     set o19b = 0
  351.     set o20a = 0
  352.     set o20b = 0
  353.     set o20c = 0
  354.     set o20i = 0
  355.     set o20j = 0
  356.     set o21a = 0
  357.     set o23a = 0
  358.     set o23a2 = 0
  359.     set o23b = 0
  360.     set o23c = 0
  361.     set o24a = 0
  362.     set o26a = 0
  363.     set o27a = 0
  364.     set o27a2 = 0
  365.     set o27c = 0
  366.     set o28a = 0
  367.     set o28a2 = 0
  368.     set o28a4 = 0
  369.     set o29a = 0
  370.     set o30a = 0
  371.     set o31a = 0
  372.     set o32a = 0
  373.     set o33a = 0
  374.     set o33a2 = 0
  375.     set o33b = 0
  376.     set o34a = 0
  377.     set o35a = 0
  378.     set o35b = 0
  379.     set o38a = 0
  380.     set o38c = 0
  381.     set o39a = 0
  382.     set o42a = 0
  383.     set o43a = 0
  384.     set o44a = 0
  385.     set o45a = 0
  386.     set o45b = 0
  387.     set o46a = 0
  388.     set o46b = 0
  389.     set o46c = 0
  390.     set o47a = 0
  391.     set o48a = 0
  392.     set o49a = 0
  393.     set o50a = 0
  394.     set o50b = 0
  395.     set o50c = 0
  396.     set o52a = 0
  397.     set o53a = 0
  398.     set o56a = 0
  399.     set o57a = 0
  400.     set o59a = 0
  401.     set o60a = 0
  402.     set o60b = 0
  403.     set o60e = 0
  404.     set o61a = 0
  405.     set o61a2 = 0
  406.     set o65a = 0
  407.     set o66a = 0
  408.     set o66b = 0
  409.     set o66d = 0
  410.     set o66e = 0
  411.     set o67a = 0
  412.     set o68a = 0
  413.     set o68a2 = 0
  414.     set o68b = 0
  415.     set o68c = 0
  416.     set o69a = 0
  417.     set o70a = 0
  418.     set o70b = 0
  419.     set o70d = 0
  420.     set o71a = 0
  421.     set o74a = 0
  422.     set o74b = 0
  423.     set o76a = 0
  424.     set o78a = 0
  425.     set o78b = 0
  426.     set o78d = 0
  427.     set o81a = 0
  428.     set o83a = 0
  429.     set o83b = 0
  430.     set o84a = 0
  431.     set o85a = 0
  432.     set o85c = 0
  433.     set o86a = 0
  434.     set o87a = 0
  435.     set o87b = 0
  436.     set o87c = 0
  437.     set o88a = 0
  438.     set o89a = 0
  439.     set o90a = 0
  440.     set doom30a = 0
  441.     when keyDown then keystroke
  442.     unload
  443.  
  444. on setGlobalAll
  445. global mode, invWind, altGlobal
  446.         set altGlobal = 0
  447.         repeat with x = 19 to 24
  448.             puppetSprite x, true
  449.             set the immediate of sprite x to true
  450.         end repeat
  451.         set invWind = 0
  452.         set mode = 0
  453.         set the castNum of sprite 24 to the number of cast "control0"
  454.         cursor 500
  455.         sound fadeIn 1, 60
  456.         puppetSound "ambience"
  457.         when keyDown then keystroke
  458.  
  459. on controlButton
  460.     global mode, invWind, invCurrent, invOff
  461.     set x0 = 385
  462.     put the mouseH into temp
  463.     if (the mouseV < 403) or (the mouseV > 461) or (temp < 381) or (temp > 624) then
  464.         exit
  465.     else if invOff = 0 then
  466.         set invCurrent = EMPTY
  467.         set width = 43
  468.         if (temp > x0) and (temp < x0 + width) then
  469.             set mode = 0
  470.         else if (temp > (x0 + width)) and (temp < x0 + (2*width)) then
  471.             set mode = 1
  472.         else if (temp > (x0 + (2*width))) and (temp < x0 + (3*width)) then
  473.             set mode = 2
  474.         else if (temp > (x0 + (3*width))) and (temp < x0 + (4*width)) then
  475.             set mode = 3
  476.         else if (temp > (x0 + (4*width))) and (temp < x0 + (5*width)) then
  477.             set mode = 4
  478.         else if (temp > (x0 + (5*width))) and (temp < 624) then
  479.             set mode = 5
  480.         end if
  481.         if mode = 4 then
  482.             if invWind = 1 then 
  483.                 exit 
  484.             else if invWind = 0 then
  485.                 cursor 4
  486.                 showInventory
  487.             end if
  488.         else 
  489.             if invWind = 1 then
  490.                 killInventory
  491.             end if
  492.         end if
  493.         set the castNum of sprite 24 to the number of cast ("control" & string(mode))
  494.         cursor (500 + mode)
  495.         updateStage
  496.     end if
  497.  
  498. on keyStroke
  499. global mode, invWind, invCurrent, invOff, playFrom
  500. set kk = the keyCode
  501. if ((the commandDown) and ((kk = 1) or (kk = 31) or (kk = 12)))¼
  502.             and (invoff = 0) then
  503.     if (kk = 1) then
  504.         if mode = 5 or mode = 10 then
  505.             saveGame
  506.             cursor 200
  507.             cursor 0
  508.             updateStage
  509.         else 
  510.             set playFrom to the frame
  511.             pause
  512.             saveGame
  513.             sound stop 2
  514.             set mode = 0
  515.             set the castNum of sprite 24 to the number of cast "control0"
  516.             cursor 200
  517.             cursor 500
  518.             if invWind = 1 then
  519.                 killInventory
  520.             end if
  521.             updateStage
  522.             continue
  523.             go value(playFrom)
  524.             exit
  525.         end if
  526.     else if (kk = 31) then
  527.         if mode = 5 or mode = 10 then
  528.             loadGame
  529.         else
  530.             set playFrom to the frame
  531.             pause
  532.             loadGame
  533.         end if
  534.     else if (kk = 12) then
  535.         doQuitRoutine
  536.     end if
  537.     exit
  538. end if
  539. if (((kk > 82) and (kk < 87)) or ((kk > 17) and (kk < 23)))¼
  540.             and (mode < 5) and (invOff = 0) then
  541.     if (kk > 82) and (kk < 87) then
  542.         set mode = (kk - 83)
  543.     else if (kk > 17) and (kk < 23) then
  544.         set mode = (kk - 18)
  545.     end if
  546.     set invCurrent = EMPTY
  547.     if invWind = 1 then
  548.         killInventory 
  549.     end if
  550.     set the castNum of sprite 24 to the number of cast ("control" & string(mode))
  551.     cursor (500 + mode)
  552.     updateStage
  553. else if ((kk = 23) or (kk = 87)) and (mode < 5) and (invOff = 0) then
  554.     set mode = 4
  555.     if invWind = 1 then 
  556.         exit 
  557.     else
  558.         showInventory
  559.     end if
  560.     set the castNum of sprite 24 to the number of cast ("control" & string(mode))
  561.     cursor (500 + mode)
  562.     updateStage
  563. end if
  564.  
  565. on keyStrokeX
  566. set kk = the keyCode
  567. if (the commandDown) and (kk = 12) then
  568.     quit
  569. end if
  570.  
  571. on optionButton
  572.     global mode, playFrom, currentGems, atOr, at28a, at56a, at74a, onOr
  573.     if mode = 10 then exit
  574.     set x0 = the left of sprite 24 + 4
  575.     set xT = integer((the mouseH - x0) / 43)
  576.     if (xT = 0) and (onOr = 1) then
  577.         repeat with x = 19 to 24
  578.             puppetSprite x, false
  579.             set the immediate of sprite x to false
  580.         end repeat
  581.         sound stop 1
  582.         sound stop 2
  583.         set atOr = 1
  584.         set the textFont of field "scoreRap" to "ercolano"
  585.         killLocal
  586.         cursor 4
  587.         OrSend
  588.         cursor 505
  589.     else if (xT = 0) and (onOr = 0) then
  590.         beep
  591.     else if xT = 1 then
  592.         repeat with x = 19 to 24
  593.             puppetSprite x, false
  594.             set the immediate of sprite x to false
  595.         end repeat
  596.         sound stop 1
  597.         sound stop 2
  598.         killLocal
  599.         set playFrom to the frame
  600.         go "info"
  601.         unload
  602.     else if xT = 2 then
  603.         repeat with x = 19 to 24
  604.             puppetSprite x, false
  605.             set the immediate of sprite x to false
  606.         end repeat
  607.         sound stop 1
  608.         sound stop 2
  609.         killLocal
  610.         set playFrom to the frame
  611.         if at28a <> 0 then
  612.             go "map28a"
  613.         else if at56a <> 0 then
  614.             go "map56a"
  615.         else if at74a <> 0 then
  616.             go "map74a"
  617.         else
  618.             go "map"
  619.             unload
  620.         end if
  621.     else if xT = 3 then
  622.         set playFrom to the frame
  623.         set the castNum of sprite 19 to the number of cast "setScreen"
  624.         set the castNum of sprite 20 to the number of cast "saveButton"
  625.         set the castNum of sprite 21 to the number of cast "loadButton"
  626.         set the castNum of sprite 22 to the number of cast "quitButton"
  627.         set the castNum of sprite 23 to the number of cast "slider"
  628.         SetVolSlider                
  629.         updateStage
  630.         set mode = 10
  631.         cursor 0
  632.         updateStage
  633.         pause
  634.     else if xT = 4 then
  635.         repeat with x = 19 to 24
  636.             puppetSprite x, false
  637.             set the immediate of sprite x to false
  638.         end repeat
  639.         sound stop 1
  640.         sound stop 2
  641.         set the textFont of field "scoreRap" to "ercolano"
  642.         killLocal
  643.         set playFrom to the frame
  644.         go "help"
  645.         unload
  646.     else if xT = 5 then
  647.         set mode = 0
  648.         set the castNum of sprite 24 to the number of cast "control0"
  649.         cursor 500
  650.         updateStage
  651.     end if
  652.  
  653. on goOr theFrame
  654.     global playFrom
  655.         set playFrom to the frame
  656.         go theFrame
  657.  
  658. on playTo
  659.     global mode, playFrom, atOr, altglobal
  660.         set atOr = 0
  661.         set mode = 0
  662.         if altglobal = 1 then
  663.             setglobalall1
  664.             setlocal1
  665.         else if altglobal = 2 then
  666.             setglobalall2
  667.             setlocal2
  668.         else
  669.             setglobalall
  670.             setlocal
  671.         end if
  672.         go value(playFrom)
  673.         unload
  674.  
  675. on goTo
  676. global altglobal, saveFrame
  677.     if altglobal = 1 then
  678.         setglobalall1
  679.         setlocal1
  680.     else if altglobal = 2 then
  681.         setglobalall2
  682.         setlocal2
  683.     else
  684.         setglobalall
  685.         setlocal
  686.     end if
  687.     repeat while the soundbusy of 2
  688.     end repeat
  689.     sound stop 2
  690.     go value(saveFrame)
  691.  
  692. on DragSlider
  693.     put 178 into vOffset                            
  694.     put 120 into top
  695.     put 230 into bottom
  696.     put integer((bottom - top) / 8) into interval
  697.     repeat while the stillDown
  698.         if (the mouseV >= top) AND (the mouseV <= bottom) then
  699.             set the locV of sprite 23 = (the mouseV + vOffset)
  700.             updateStage
  701.         end if
  702.     end repeat
  703.     set the soundLevel to value(GetVolSetting(top,bottom,interval,(the locV of sprite 23 - vOffset)))
  704.     SetVolSlider
  705.     doSound "00SetUp"
  706.     updateStage
  707.  
  708. on SetVolSlider
  709.     put 178 into vOffset                           
  710.     put 120 into top
  711.     put 230 into bottom
  712.     put integer((bottom - top) / 8) into interval 
  713.     put the soundLevel into howLoud
  714.     set the locV of sprite 23 = integer((bottom + vOffSet) - (howLoud * interval) - (.5 * interval))
  715.     updateStage
  716.  
  717. on GetVolSetting max,min,levels,currentLoc
  718.   if (currentLoc >= max) AND (currentLoc <= (max + levels)) then
  719.     return 7
  720.   else if (currentLoc >= (max + levels)) AND (currentLoc <= (max + (2 * levels))) then
  721.     return 6
  722.   else if (currentLoc >= (max + (2 * levels))) AND (currentLoc <= (max + (3 * levels))) then
  723.     return 5
  724.   else if (currentLoc >= (max + (3 * levels))) AND (currentLoc <= (max + (4 * levels))) then
  725.     return 4
  726.   else if (currentLoc >= (max + (4 * levels))) AND (currentLoc <= (max + (5 * levels))) then
  727.     return 3
  728.   else if (currentLoc >= (max + (4 * levels))) AND (currentLoc <= (max + (6 * levels))) then
  729.     return 2
  730.   else if (currentLoc >= (max + (6 * levels))) AND (currentLoc <= (max + (7 * levels))) then
  731.     return 1
  732.   else if (currentLoc >= (max + (7 * levels))) AND (currentLoc <= (min)) then
  733.     return 0
  734.   end if
  735.  
  736. on killScreenOver
  737.     global mode, altglobal, playFrom
  738.     set the castNum of sprite 19 to the number of cast "placeHolder"
  739.     set the castNum of sprite 20 to the number of cast "placeHolder"
  740.     set the castNum of sprite 21 to the number of cast "placeHolder"
  741.     set the castNum of sprite 22 to the number of cast "placeHolder"
  742.     set the castNum of sprite 23 to the number of cast "placeHolder"
  743.     set the locV of sprite 23 = 409
  744.     updateStage
  745. if mode < 5 or mode = 10 then
  746.     set mode = 0
  747.     if altglobal = 1 then
  748.         set the castNum of sprite 24 to the number of cast "control10"
  749.     else if altglobal = 2 then
  750.         set the castNum of sprite 24 to the number of cast "control20"
  751.     else
  752.         set the castNum of sprite 24 to the number of cast "control0"
  753.     end if
  754.     cursor 500
  755.     continue
  756.     go value(playFrom)
  757. else
  758.     continue
  759.     sound stop 1
  760. end if
  761.  
  762. on DoQuitRoutine
  763. global mode, playFrom
  764. if mode = 5 then
  765.     set the castNum of sprite 19 to the number of cast "quitScreen"
  766.     set the castNum of sprite 20 to 0
  767.     set the castNum of sprite 21 to the number of cast "yesButton"
  768.     set the castNum of sprite 22 to the number of cast "noButton"
  769.     set the castNum of sprite 23 to 0
  770.     updateStage
  771.     cursor 0
  772.     updateStage
  773.     pause
  774. else
  775.     sound stop 1
  776.     set playFrom to the frame
  777.     set the castNum of sprite 19 to the number of cast "quitScreen"
  778.     set the castNum of sprite 20 to 0
  779.     set the castNum of sprite 21 to the number of cast "yesButton"
  780.     set the castNum of sprite 22 to the number of cast "noButton"
  781.     set the castNum of sprite 23 to 0
  782.     updateStage
  783.     cursor 0
  784.     updateStage
  785.     pause
  786. end if
  787.  
  788.  
  789. on showInventory
  790.     global invList, invBanksAll, invWind, inv1, inv2, inv3, inv4
  791.     if the number of items of invList <= 4 then
  792.         set the castNum of sprite 19 to the number of cast "inventory0"
  793.     else 
  794.         set the castNum of sprite 19 to the number of cast "inventory1"
  795.     end if
  796.     set the castNum of sprite 20 to the number of cast inv1
  797.     set the castNum of sprite 21 to the number of cast inv2
  798.     set the castNum of sprite 22 to the number of cast inv3
  799.     set the castNum of sprite 23 to the number of cast inv4
  800.     set invWind = 1
  801.  
  802. on killInventory
  803.     global invWind, invBank
  804.     repeat with x = 19 to 23
  805.         set the castNum of sprite x to the number of cast "placeHolder"
  806.     end repeat
  807.     updateStage
  808.     set invWind = 0
  809.     set invBank = 1
  810.     updateInventory
  811.  
  812. on inventoryButton
  813.     global invList, invBank, invBanksAll
  814.     set xiv = the number of items of invList
  815.     set xL = the left of sprite the clickOn
  816.     if the mouseH - xL > 203 then
  817.         set xH = 27
  818.         set xT = the top of sprite the clickOn
  819.         if the mouseV - xT < xH then
  820.             set invBank = invBank - 1
  821.             if invBank < 1 then 
  822.                 set invBank = 1
  823.             end if
  824.         else
  825.             set invBank = invBank + 1
  826.             if invBank > invBanksAll then 
  827.                 set invBank = invBanksAll
  828.             end if
  829.         end if
  830.         if xiv <= 4 then 
  831.             set the castNum of sprite 19 to the number of cast "inventory0"
  832.         else if invBank = 1 and xiv > 4 then
  833.             set the castNum of sprite 19 to the number of cast "inventory1"
  834.         else if invBank > 1 and invBanksAll > invBank then
  835.             set the castNum of sprite 19 to the number of cast "inventory2"
  836.         else if invBanksAll = invBank then
  837.             set the castNum of sprite 19 to the number of cast "inventory3"
  838.         end if
  839.     end if
  840.     updateInventory
  841.     updateStage
  842.  
  843. on updateInventory 
  844.     global invList, invBank, invBanksAll, inv1, inv2, inv3, inv4, invWind
  845.     set xi = the number of items of invList
  846.     set xv = ((invBank * 4) - 3)
  847.     if xi mod 4 = 0 then
  848.         set invBanksAll = xi / 4
  849.     else 
  850.         set invBanksAll = (xi / 4) + 1
  851.     end if
  852.     if invList <> empty then
  853.         set inv1 = item xv of invList
  854.         if item (xv + 1) of invList <> empty then
  855.             set inv2 = item (xv + 1) of invList
  856.         else
  857.             set inv2 = "iBlank"
  858.         end if
  859.         if item (xv + 2) of invList <> empty then
  860.             set inv3 = item (xv + 2) of invList
  861.         else
  862.             set inv3 = "iBlank"
  863.         end if
  864.         if item (xv + 3) of invList <> empty then
  865.             set inv4 = item (xv + 3) of invList
  866.         else
  867.             set inv4 = "iBlank"
  868.         end if
  869.         if invWind = 1 then
  870.             set the castNum of sprite 20 to the number of cast inv1
  871.             set the castNum of sprite 21 to the number of cast inv2
  872.             set the castNum of sprite 22 to the number of cast inv3
  873.             set the castNum of sprite 23 to the number of cast inv4
  874.         end if
  875.     end if
  876.  
  877. on addInventory whatInventory
  878.     global invList, invBank
  879.     if invList contains whatInventory then 
  880.         -- nothing
  881.     else       
  882.         put whatInventory into item (the number of items of invList + 1) of invList
  883.         doSound "grabInventory"
  884.         set invBank = 1
  885.         updateInventory
  886.     end if
  887.  
  888. on removeInventory whatInventory,calcGemFlag
  889.     global mode, invList, invBank, altglobal, invcurrent
  890.     if invList contains whatInventory then
  891.         repeat with x = 1 to the number of items of invList
  892.             if item x of invList = whatInventory then
  893.                 delete item x of invList
  894.                 if calcGemFlag <> 1 then
  895.                     doSound "grabInventory"
  896.                 end if
  897.                 set invBank = 1
  898.                 updateInventory
  899.                 exit repeat
  900.             end if 
  901.         end repeat
  902.         set mode = 0
  903.         if altglobal = 1 then
  904.             set the castNum of sprite 24 to the number of cast "control10"
  905.         else if altglobal = 2 then
  906.             set the castNum of sprite 24 to the number of cast "control20"
  907.         else
  908.             set the castNum of sprite 24 to the number of cast "control0"
  909.         end if
  910.         cursor 500
  911.     end if
  912.  
  913. on doInventory module
  914.     global invCurrent
  915.     set xm = char 1 to 3 of the movie
  916.     if module contains xm then
  917.         set clickit = the clickOn
  918.         cursor (the castNum of sprite clickit)
  919.         set invCurrent = the name of cast (the castNum of sprite clickit)
  920.         killInventory
  921.     else
  922.         set invCurrent = EMPTY
  923.         badInventory
  924.         cursor 504
  925.     end if
  926.  
  927. on badInventory
  928.     global Bri
  929.     if Bri = 0 then
  930.         set Bri = 1
  931.         doSound "invSnd1"
  932.         updateStage
  933.     else if Bri = 1 then
  934.         set Bri = 2
  935.         doSound "invSnd2"
  936.         updateStage
  937.     else if Bri = 2 then
  938.         set Bri = 3
  939.         doSound "invSnd3"
  940.         updateStage
  941.     else if Bri = 3 then
  942.         set Bri = 4
  943.         doSound "invSnd4"
  944.         updateStage
  945.     else if Bri = 4 then
  946.         set Bri = 5
  947.         doSound "invSnd5"
  948.         updateStage
  949.     else if Bri = 5 then
  950.         set Bri = 6
  951.         doSound "invSnd2"
  952.         updateStage
  953.     else if Bri = 6 then
  954.         set Bri = 7
  955.         doSound "invSnd1"
  956.         updateStage
  957.     else if Bri = 7 then
  958.         set Bri = 8
  959.         doSound "invSnd3"
  960.         updateStage
  961.     else if Bri = 8 then
  962.         set Bri = 9
  963.         doSound "invSnd5"
  964.         updateStage
  965.     else if Bri = 9 then
  966.         set Bri = 0
  967.         doSound "invSnd4"
  968.         updateStage
  969.     end if
  970.     end if
  971.  
  972. on calcGems howMany
  973.     global currentGems, invList, invBank
  974.     set currentGems = integer(currentGems + howMany)
  975.     removeInventory "iG",1  
  976.     repeat with g = 1 to 3
  977.         removeInventory string("iG"&g),1
  978.     end repeat
  979.     if currentGems <= 0 then
  980.         set currentGems = 0
  981.     else if (currentGems >= 1) AND (currentGems <= 3) then
  982.         put string("iG"¤tGems) into item (the number of items of invList + 1) of invList
  983.     else if (currentGems >= 4) then
  984.         put "iG" into item (the number of items of invList + 1) of invList
  985.     end if
  986.     doSound "gemPing"
  987.     set invBank = 1
  988.     updateInventory
  989.  
  990. on calcScore howMany
  991.     global currentScore, hintCount
  992.     doSound "score" 
  993.     set currentScore = integer(currentScore + howMany)
  994.     if currentScore <= 0 then 
  995.         set currentScore = 0
  996.     end if
  997.     set the text of cast "scoreRap" to string(currentScore)
  998.     set hintCount = integer(hintCount + 1)
  999.  
  1000. on calcScore2 howMany
  1001.     global currentScore
  1002.     doSound "bonus" 
  1003.     set currentScore = integer(currentScore + howMany)
  1004.     set the text of cast "scoreRap" to string(currentScore)
  1005.  
  1006. on jumpTo theFrame
  1007.     global jumpFrame
  1008.     set tF = the frame
  1009.     put tF into item (the number of items of jumpFrame + 1) of jumpFrame 
  1010.     go frame theFrame
  1011.  
  1012. on jumpBack
  1013.     global jumpFrame
  1014.     put value (item (the number of items of jumpFrame) of jumpFrame) into tF
  1015.     go frame tF
  1016.     delete item (the number of items of jumpFrame) of jumpFrame
  1017.  
  1018. on doSound x
  1019.     set z = the pathname & "wrath audio:" & x
  1020.     sound playFile 2, z
  1021.  
  1022. on checkSound
  1023.     if the soundBusy of 2 then go the frame
  1024.  
  1025. on lookItem theRap
  1026.     set the text of cast "lookRap" to theRap
  1027.     set the textFont of field "lookRap" to "ercolano"
  1028.     set the type of sprite 19 to 16
  1029.     set the ink of sprite 19 to 36
  1030.     set the castNum of sprite 19 to the number of cast "lookRap"
  1031.     updateStage
  1032.     set tt = the ticks
  1033.     repeat while tt + 90 > the ticks
  1034.         nothing
  1035.     end repeat   
  1036.     set the castNum of sprite 19 to the number of cast "placeHolder"
  1037.     updateStage
  1038.  
  1039. on memDump fromFrame, toFrame
  1040.     global mode
  1041.     cursor 4
  1042.     unLoad
  1043.     preLoad fromFrame, toFrame  
  1044.     cursor (500 + mode)
  1045.  
  1046. on WaitForQT channelNumber
  1047.     if the movieTime of sprite value(channelNumber) < the duration of cast ¼
  1048.             string(the name of cast value(the castNum of sprite value(channelNumber))) then
  1049.         go (the frame)
  1050.     else
  1051.         go (the frame + 1)
  1052.     end if